//方法的重写
package main

import (
	"fmt"
)

type Human struct {
	name, phone string
	age         int
}

func (h *Human) SayHi() {
	fmt.Printf("Hi, my name is %s,concat me on %s \n", h.name, h.phone)
}

type Employee struct {
	Human
	company string
}

//method重写
func (e *Employee) SayHi() {
	fmt.Printf("Hi,I'am  work at %s \n", e.company)
}

func main() {
	person := Human{"human", "000000", 20}
	staff := Employee{Human{"John", "400-888-000", 30}, "MicroSoft"}
	person.SayHi()
	staff.SayHi()
}
